package com.bw.my.mvvm.model;

import com.bw.mvvm.entity.BaseEntity;
import com.bw.mvvm.mvvm.model.BaseModel;
import com.bw.mvvm.network.load.HttpEnum;
import com.bw.mvvm.network.load.HttpFactory;
import com.bw.my.mvvm.model.entity.Api;

import io.reactivex.Observable;
import okhttp3.RequestBody;

public class ShipAddressModel extends BaseModel {

    public Observable<BaseEntity> requestAddress(RequestBody body){
        return changeFunc(HttpFactory.create(HttpEnum.TokenSign)
        .getRetrofit().create(Api.class).getShipAddressList(body));
    }
    public Observable<BaseEntity> AddAddress(RequestBody body){
        return changeFunc(HttpFactory.create(HttpEnum.Token)
                .getRetrofit().create(Api.class).AddShipAddress(body));
    }
}
